Conversation
size-limit report 📦
|
Velenir
left a comment
There was a problem hiding this comment.
Could you add something into Readme or docs/Delta
Ideally you could also add some tests, but that can be done later
src/methods/delta/getDeltaOrders.ts
Outdated
| export type DeltaOrderFromAPI = Omit<DeltaAuction, 'signature' | 'order'> & { | ||
| order: DeltaAuctionOrder | ExternalDeltaOrder; | ||
| }; |
There was a problem hiding this comment.
So both normal Delta Orders and External Orders are returned together from the same endpoints?
It may be alright when requesting order by hash/id, you can know what kind of order you expect and are able to assert/check right away.
But for getting all /orders this will be a pain to check for types, especially when an array contains all different types DeltaOrderFromAPI[].
This make the change a breaking change too.
Would it be possible to add an extra request param to prefilter on API side?
Like we have OrdersFilter.type=MARKET|LIMIT, External would fit right in.
There was a problem hiding this comment.
we have OnChainOrderType on API (Order/ProductiveOrder/ExternalOrder and soon TWAPOrder), can add this filter
There was a problem hiding this comment.
added the filter and order type inference for the ease of usage
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Note
Medium Risk
Adds a new external-order flow (build/sign/post/pre-sign) and changes several core Delta order types/SDK exports, so integrators may see compile-time and behavioral differences when handling order responses and amount/partner-fee resolution.
Overview
Adds External Delta Orders support end-to-end: new
ExternalOrderEIP-712 typed data, SDK methods tobuild/sign/post/preSignand a one-shotsubmitExternalDeltaOrder, plus docs and an Aave-based example.Updates Delta order typing and APIs to be order-type aware (
DeltaAuctionnow includesonChainOrderTypeand supportsOrdervsExternalOrderpayloads), extendsgetDeltaOrderswith anonChainOrderTypefilter, and refactors shared slippage/partner-fee logic intohelpers/misc(reused by both standard and external order builders).Written by Cursor Bugbot for commit fc8bc08. This will update automatically on new commits. Configure here.